Object-oriented programming
part 17/57 · 94.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
SOLID includes the open/closed principle, which says that classes and functions should be "open for extension, but closed for modification". Luca Cardelli has stated that OOP languages have "extremely poor modularity properties with respect to class extension and modification", and tend to be extremely complex.cite-ref-badprop-40-1[40] The latter point is reiterated by Joe Armstrong, the principal inventor of Erlang, who is quoted as saying:cite-ref-armstrongjoe-41-1[41]
The problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
Leo Brodie says that information hiding can lead to duplicate code,cite-ref-43[43] which goes against the don't repeat yourself rule of software development.cite-ref-44[44]
Composition